package review;

import java.util.ArrayList;
import java.util.List;

public class Zoo {
	private final List<Animal> animals;

	public Zoo() {
		this.animals = new ArrayList<Animal>();
	}

	public void addAnimal(Animal animal) {
		animals.add(animal);
	}

	public void printAnimals() {
		for (Animal animal : animals) {
			System.out.println(animal.getName());
			animal.makeSound();
		}
	}
}
